from fake_useragent import UserAgent
from . import proxies_list
import random


agent = UserAgent().random
first_headers = {
    "authority": "pbaccess.video.qq.com",
    "pragma": "no-cache",
    "cache-control": "no-cache",
    "sec-ch-ua": "\";Not A Brand\";v=\"99\", \"Chromium\";v=\"94\"",
    "accept": "application/json, text/plain, */*",
    "content-type": "application/json",
    "sec-ch-ua-mobile": "?0",
    "user-agent": agent,
    "sec-ch-ua-platform": "\"Windows\"",
    "origin": "https://v.qq.com",
    "sec-fetch-site": "same-site",
    "sec-fetch-mode": "cors",
    "sec-fetch-dest": "empty",
    "referer": "https://v.qq.com/",
    "accept-language": "zh-CN,zh;q=0.9",
    "q-ua2": "PR=PC&CO=WBK&QV=3&PL=WIN&PB=GE&PPVN=11.9.0.5355&COVC=049400&CHID=10026021&RL=1920*1080&MO=QB&VE=GA&BIT=64&OS=10.0.19045",
    "q-guid": "a2ddc6ab715db7131410136f377988cb"
}

second_headers = {
    "authority": "v.qq.com",
    "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
    "accept-language": "zh-CN,zh;q=0.9",
    "cache-control": "no-cache",
    "pragma": "no-cache",
    "referer": "https://v.qq.com/channel/tv/list?filter_params=sort%3D75&page_id=channel_list_second_page",
    "sec-ch-ua": "\"Google Chrome\";v=\"117\", \"Not;A=Brand\";v=\"8\", \"Chromium\";v=\"117\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "document",
    "sec-fetch-mode": "navigate",
    "sec-fetch-site": "same-origin",
    "sec-fetch-user": "?1",
    "upgrade-insecure-requests": "1",
    "user-agent": agent
}

url = "https://pbaccess.video.qq.com/trpc.vector_layout.page_view.PageService/getPage"

params = {
    "video_appid": "3000010"
}

proxy = {
        'http': random.choice(proxies_list.proxy_list)
    }
